const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('config_hero', {
    id: {
      type: DataTypes.INTEGER,
      allowNull: false,
      primaryKey: true
    },
    name: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    story: {
      type: DataTypes.TEXT,
      allowNull: true
    },
    rarity: {
      type: DataTypes.INTEGER,
      allowNull: true
    },
    face: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    photo: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    avatar: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    hp: {
      type: DataTypes.INTEGER,
      allowNull: true
    },
    attack: {
      type: DataTypes.INTEGER,
      allowNull: true
    },
    defence: {
      type: DataTypes.INTEGER,
      allowNull: true
    },
    speed: {
      type: DataTypes.INTEGER,
      allowNull: true
    },
    skill1: {
      type: DataTypes.INTEGER,
      allowNull: true
    },
    skill2: {
      type: DataTypes.INTEGER,
      allowNull: true
    },
    skill3: {
      type: DataTypes.INTEGER,
      allowNull: true
    },
    skill4: {
      type: DataTypes.INTEGER,
      allowNull: true
    },
    skill5: {
      type: DataTypes.INTEGER,
      allowNull: true
    },
    skill6: {
      type: DataTypes.INTEGER,
      allowNull: true
    },
    can_get: {
      type: DataTypes.INTEGER,
      allowNull: true
    },
    talent1: {
      type: DataTypes.INTEGER,
      allowNull: true
    },
    talent2: {
      type: DataTypes.INTEGER,
      allowNull: true
    },
    talent3: {
      type: DataTypes.INTEGER,
      allowNull: true
    },
    talent4: {
      type: DataTypes.INTEGER,
      allowNull: true
    },
    talent5: {
      type: DataTypes.INTEGER,
      allowNull: true
    },
    talent6: {
      type: DataTypes.INTEGER,
      allowNull: true
    }
  }, {
    sequelize,
    tableName: 'config_hero',
    timestamps: true,
    indexes: [
      {
        name: "PRIMARY",
        unique: true,
        using: "BTREE",
        fields: [
          { name: "id" },
        ]
      },
    ]
  });
};
